package day8.am;
import java.util.*;
public class TestArrayCopy6 {
    public static void main(String[] args) {
        /*
        * 1 2
        * */
        int[] data = {1, 2, 3, 4, 5};
//        int[] temp = new int[4];
        int[] temp = Arrays.copyOf(data, 4);
//        System.arraycopy(data,0,temp,0,2);
        System.arraycopy(data, 3, temp, 2,2);
        for(int k : temp){
            System.out.println(k);
        }
    }
}
